# -*- coding: utf-8 -*-
# @Software :   PyCharm
# @File     :   mixin_utils.py
# @Author   :   zhaolie
# @Contact  :   zhaolie1989@gmail.com
# @Time     :   2019/11/24 6:48 下午
# @Desc     :   None      

# here put the import lib

from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator


class LoginRequiredMixin:
    @method_decorator(login_required(login_url='/login/'))
    def dispatch(self, request, *args, **kwargs):
        return super(LoginRequiredMixin, self).dispatch(request, *args, **kwargs)
